<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>The Cobra Snake</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script>
<script src="http://connect.facebook.net/en_US/all.js"></script> 
<script type="text/javascript" src="http://api.face.com/lib/api_client.js"></script>
<script type="text/javascript" src="http://api.face.com/lib/tagger.js"></script>
<script type="text/javascript">
     
// Facebook Function- called when the user is connected to Facebook
function loadFacebook()
{
	FB.getLoginStatus(function (response) {
		var osession = response.session;
		if (osession != null)
		{
			$("#fblogin").hide();
			$("#fblogout").show();
		}
		
		detectFaces();
	});
}

function tagger_error(err)
{
	if (err.error_code && err.error_message)
	$("#lerr").show().html("<b>" + err.error_code + "</b>: " + err.error_message);
	else
	$("#lerr").show().html("<b>" + err + "</b>: ");
}

</script>

</head>

<body>
<span class="btn" id="fblogin" onclick="facebookLogin();"> Connect with Facebook </span> <span class="btn" id="fblogout" onclick="facebookLogout();" style="display: none;"> Logout from Facebook </span>

<img id="main-image" src="photographs/p16doinaj419hofpv1v2c5uv4255.JPG" border="0" alt="tag gable photo" />
<script type="text/javascript">

FaceClientAPI.init("467277d7ef245e667ea3b5fd6941e2ec");

FaceTagger.load("#main-image", {
  click_add_tag: false,
  resizable: true,
  facebook: true,
  fade: true,
  tags_list: true,
  add_tag_button: true
});

// initialize the library with the API key
FB.init({ apiKey: "185910078156061",
		status : true, // check login status
		cookie : true, // enable cookies to allow the server to access the session
		xfbml  : true  // parse XFBML        
});      

FB.getLoginStatus(function (response)
 {    
	 if (response.session)    
		 loadFacebook();    
	 else    
		 detectFaces();    
 }); 

</script>
<div id="fb-root"></div> 
</body>
</html>